Integrand size = 28, antiderivative size = 161 \[ \int \frac {1}{\sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))^2} \, dx=\frac {2 \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{\sqrt {a} c^2 f}-\frac {\arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {2} \sqrt {a+a \sec (e+f x)}}\right )}{2 \sqrt {2} \sqrt {a} c^2 f}+\frac {3 \cot (e+f x) \sqrt {a+a \sec (e+f x)}}{2 a c^2 f}-\frac {\cot ^3(e+f x) (a+a \sec (e+f x))^{3/2}}{3 a^2 c^2 f} \]
-1/3*cot(f*x+e)^3*(a+a*sec(f*x+e))^(3/2)/a^2/c^2/f+2*arctan(a^(1/2)*tan(f* x+e)/(a+a*sec(f*x+e))^(1/2))/c^2/f/a^(1/2)-1/4*arctan(1/2*a^(1/2)*tan(f*x+ e)*2^(1/2)/(a+a*sec(f*x+e))^(1/2))/c^2/f*2^(1/2)/a^(1/2)+3/2*cot(f*x+e)*(a +a*sec(f*x+e))^(1/2)/a/c^2/f
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.40 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.52 \[ \int \frac {1}{\sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))^2} \, dx=\frac {\left (\operatorname {Hypergeometric2F1}\left (-\frac {3}{2},1,-\frac {1}{2},\frac {1}{2} (1-\sec (e+f x))\right )-2 \operatorname {Hypergeometric2F1}\left (-\frac {3}{2},1,-\frac {1}{2},1-\sec (e+f x)\right )\right ) \tan (e+f x)}{3 c^2 f (-1+\sec (e+f x))^2 \sqrt {a (1+\sec (e+f x))}} \]
((Hypergeometric2F1[-3/2, 1, -1/2, (1 - Sec[e + f*x])/2] - 2*Hypergeometri c2F1[-3/2, 1, -1/2, 1 - Sec[e + f*x]])*Tan[e + f*x])/(3*c^2*f*(-1 + Sec[e + f*x])^2*Sqrt[a*(1 + Sec[e + f*x])])
Time = 0.44 (sec) , antiderivative size = 151, normalized size of antiderivative = 0.94, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {3042, 4392, 3042, 4375, 382, 27, 445, 27, 397, 216}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {1}{\sqrt {a \sec (e+f x)+a} (c-c \sec (e+f x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sqrt {a \csc \left (e+f x+\frac {\pi }{2}\right )+a} \left (c-c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^2}dx\) |
\(\Big \downarrow \) 4392 |
\(\displaystyle \frac {\int \cot ^4(e+f x) (\sec (e+f x) a+a)^{3/2}dx}{a^2 c^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {\left (\csc \left (e+f x+\frac {\pi }{2}\right ) a+a\right )^{3/2}}{\cot \left (e+f x+\frac {\pi }{2}\right )^4}dx}{a^2 c^2}\) |
\(\Big \downarrow \) 4375 |
\(\displaystyle -\frac {2 \int \frac {\cot ^4(e+f x) (\sec (e+f x) a+a)^2}{\left (\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+1\right ) \left (\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+2\right )}d\left (-\frac {\tan (e+f x)}{\sqrt {\sec (e+f x) a+a}}\right )}{a^2 c^2 f}\) |
\(\Big \downarrow \) 382 |
\(\displaystyle -\frac {2 \left (\frac {1}{6} \int -\frac {3 a \cot ^2(e+f x) (\sec (e+f x) a+a) \left (\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+3\right )}{\left (\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+1\right ) \left (\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+2\right )}d\left (-\frac {\tan (e+f x)}{\sqrt {\sec (e+f x) a+a}}\right )+\frac {1}{6} \cot ^3(e+f x) (a \sec (e+f x)+a)^{3/2}\right )}{a^2 c^2 f}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {2 \left (\frac {1}{6} \cot ^3(e+f x) (a \sec (e+f x)+a)^{3/2}-\frac {1}{2} a \int \frac {\cot ^2(e+f x) (\sec (e+f x) a+a) \left (\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+3\right )}{\left (\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+1\right ) \left (\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+2\right )}d\left (-\frac {\tan (e+f x)}{\sqrt {\sec (e+f x) a+a}}\right )\right )}{a^2 c^2 f}\) |
\(\Big \downarrow \) 445 |
\(\displaystyle -\frac {2 \left (\frac {1}{6} \cot ^3(e+f x) (a \sec (e+f x)+a)^{3/2}-\frac {1}{2} a \left (\frac {3}{2} \cot (e+f x) \sqrt {a \sec (e+f x)+a}-\frac {1}{2} \int \frac {a \left (\frac {3 a \tan ^2(e+f x)}{\sec (e+f x) a+a}+7\right )}{\left (\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+1\right ) \left (\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+2\right )}d\left (-\frac {\tan (e+f x)}{\sqrt {\sec (e+f x) a+a}}\right )\right )\right )}{a^2 c^2 f}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {2 \left (\frac {1}{6} \cot ^3(e+f x) (a \sec (e+f x)+a)^{3/2}-\frac {1}{2} a \left (\frac {3}{2} \cot (e+f x) \sqrt {a \sec (e+f x)+a}-\frac {1}{2} a \int \frac {\frac {3 a \tan ^2(e+f x)}{\sec (e+f x) a+a}+7}{\left (\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+1\right ) \left (\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+2\right )}d\left (-\frac {\tan (e+f x)}{\sqrt {\sec (e+f x) a+a}}\right )\right )\right )}{a^2 c^2 f}\) |
\(\Big \downarrow \) 397 |
\(\displaystyle -\frac {2 \left (\frac {1}{6} \cot ^3(e+f x) (a \sec (e+f x)+a)^{3/2}-\frac {1}{2} a \left (\frac {3}{2} \cot (e+f x) \sqrt {a \sec (e+f x)+a}-\frac {1}{2} a \left (4 \int \frac {1}{\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+1}d\left (-\frac {\tan (e+f x)}{\sqrt {\sec (e+f x) a+a}}\right )-\int \frac {1}{\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+2}d\left (-\frac {\tan (e+f x)}{\sqrt {\sec (e+f x) a+a}}\right )\right )\right )\right )}{a^2 c^2 f}\) |
\(\Big \downarrow \) 216 |
\(\displaystyle -\frac {2 \left (\frac {1}{6} \cot ^3(e+f x) (a \sec (e+f x)+a)^{3/2}-\frac {1}{2} a \left (\frac {3}{2} \cot (e+f x) \sqrt {a \sec (e+f x)+a}-\frac {1}{2} a \left (\frac {\arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {2} \sqrt {a \sec (e+f x)+a}}\right )}{\sqrt {2} \sqrt {a}}-\frac {4 \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a}}\right )}{\sqrt {a}}\right )\right )\right )}{a^2 c^2 f}\) |
(-2*((Cot[e + f*x]^3*(a + a*Sec[e + f*x])^(3/2))/6 - (a*(-1/2*(a*((-4*ArcT an[(Sqrt[a]*Tan[e + f*x])/Sqrt[a + a*Sec[e + f*x]]])/Sqrt[a] + ArcTan[(Sqr t[a]*Tan[e + f*x])/(Sqrt[2]*Sqrt[a + a*Sec[e + f*x]])]/(Sqrt[2]*Sqrt[a]))) + (3*Cot[e + f*x]*Sqrt[a + a*Sec[e + f*x]])/2))/2))/(a^2*c^2*f)
3.1.70.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
Int[((e_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_) , x_Symbol] :> Simp[(e*x)^(m + 1)*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q + 1)/ (a*c*e*(m + 1))), x] - Simp[1/(a*c*e^2*(m + 1)) Int[(e*x)^(m + 2)*(a + b* x^2)^p*(c + d*x^2)^q*Simp[(b*c + a*d)*(m + 3) + 2*(b*c*p + a*d*q) + b*d*(m + 2*p + 2*q + 5)*x^2, x], x], x] /; FreeQ[{a, b, c, d, e, p, q}, x] && NeQ[ b*c - a*d, 0] && LtQ[m, -1] && IntBinomialQ[a, b, c, d, e, m, 2, p, q, x]
Int[((e_) + (f_.)*(x_)^2)/(((a_) + (b_.)*(x_)^2)*((c_) + (d_.)*(x_)^2)), x_ Symbol] :> Simp[(b*e - a*f)/(b*c - a*d) Int[1/(a + b*x^2), x], x] - Simp[ (d*e - c*f)/(b*c - a*d) Int[1/(c + d*x^2), x], x] /; FreeQ[{a, b, c, d, e , f}, x]
Int[((g_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_ .)*((e_) + (f_.)*(x_)^2), x_Symbol] :> Simp[e*(g*x)^(m + 1)*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q + 1)/(a*c*g*(m + 1))), x] + Simp[1/(a*c*g^2*(m + 1)) Int[(g*x)^(m + 2)*(a + b*x^2)^p*(c + d*x^2)^q*Simp[a*f*c*(m + 1) - e*(b*c + a*d)*(m + 2 + 1) - e*2*(b*c*p + a*d*q) - b*e*d*(m + 2*(p + q + 2) + 1)*x^ 2, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, p, q}, x] && LtQ[m, -1]
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n _.), x_Symbol] :> Simp[-2*(a^(m/2 + n + 1/2)/d) Subst[Int[x^m*((2 + a*x^2 )^(m/2 + n - 1/2)/(1 + a*x^2)), x], x, Cot[c + d*x]/Sqrt[a + b*Csc[c + d*x] ]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0] && IntegerQ[m/2] && I ntegerQ[n - 1/2]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(csc[(e_.) + (f_.)*(x_)]*( d_.) + (c_))^(n_.), x_Symbol] :> Simp[((-a)*c)^m Int[Cot[e + f*x]^(2*m)*( c + d*Csc[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && E qQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && RationalQ[n] && !( IntegerQ[n] && GtQ[m - n, 0])
Time = 2.33 (sec) , antiderivative size = 202, normalized size of antiderivative = 1.25
method | result | size |
default | \(-\frac {\sqrt {a \left (\sec \left (f x +e \right )+1\right )}\, \left (3 \sqrt {2}\, \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )+\sqrt {\cot \left (f x +e \right )^{2}-2 \csc \left (f x +e \right ) \cot \left (f x +e \right )+\csc \left (f x +e \right )^{2}-1}\right )-24 \,\operatorname {arctanh}\left (\frac {\sin \left (f x +e \right )}{\left (\cos \left (f x +e \right )+1\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}}\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}+22 \cot \left (f x +e \right )^{3}+4 \csc \left (f x +e \right ) \cot \left (f x +e \right )^{2}-18 \csc \left (f x +e \right )^{2} \cot \left (f x +e \right )\right )}{12 c^{2} f a}\) | \(202\) |
-1/12/c^2/f/a*(a*(sec(f*x+e)+1))^(1/2)*(3*2^(1/2)*(-cos(f*x+e)/(cos(f*x+e) +1))^(1/2)*ln(csc(f*x+e)-cot(f*x+e)+(cot(f*x+e)^2-2*csc(f*x+e)*cot(f*x+e)+ csc(f*x+e)^2-1)^(1/2))-24*arctanh(sin(f*x+e)/(cos(f*x+e)+1)/(-cos(f*x+e)/( cos(f*x+e)+1))^(1/2))*(-cos(f*x+e)/(cos(f*x+e)+1))^(1/2)+22*cot(f*x+e)^3+4 *csc(f*x+e)*cot(f*x+e)^2-18*csc(f*x+e)^2*cot(f*x+e))
Time = 0.35 (sec) , antiderivative size = 520, normalized size of antiderivative = 3.23 \[ \int \frac {1}{\sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))^2} \, dx=\left [-\frac {3 \, \sqrt {2} \sqrt {-a} {\left (\cos \left (f x + e\right ) - 1\right )} \log \left (-\frac {2 \, \sqrt {2} \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - 3 \, a \cos \left (f x + e\right )^{2} - 2 \, a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )^{2} + 2 \, \cos \left (f x + e\right ) + 1}\right ) \sin \left (f x + e\right ) + 12 \, \sqrt {-a} {\left (\cos \left (f x + e\right ) - 1\right )} \log \left (-\frac {8 \, a \cos \left (f x + e\right )^{3} + 4 \, {\left (2 \, \cos \left (f x + e\right )^{2} - \cos \left (f x + e\right )\right )} \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right ) - 7 \, a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right ) + 1}\right ) \sin \left (f x + e\right ) - 4 \, {\left (11 \, \cos \left (f x + e\right )^{2} - 9 \, \cos \left (f x + e\right )\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}}}{24 \, {\left (a c^{2} f \cos \left (f x + e\right ) - a c^{2} f\right )} \sin \left (f x + e\right )}, \frac {3 \, \sqrt {2} \sqrt {a} {\left (\cos \left (f x + e\right ) - 1\right )} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt {a} \sin \left (f x + e\right )}\right ) \sin \left (f x + e\right ) + 12 \, \sqrt {a} {\left (\cos \left (f x + e\right ) - 1\right )} \arctan \left (\frac {2 \, \sqrt {a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right )}{2 \, a \cos \left (f x + e\right )^{2} + a \cos \left (f x + e\right ) - a}\right ) \sin \left (f x + e\right ) + 2 \, {\left (11 \, \cos \left (f x + e\right )^{2} - 9 \, \cos \left (f x + e\right )\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}}}{12 \, {\left (a c^{2} f \cos \left (f x + e\right ) - a c^{2} f\right )} \sin \left (f x + e\right )}\right ] \]
[-1/24*(3*sqrt(2)*sqrt(-a)*(cos(f*x + e) - 1)*log(-(2*sqrt(2)*sqrt(-a)*sqr t((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)*sin(f*x + e) - 3*a*cos(f *x + e)^2 - 2*a*cos(f*x + e) + a)/(cos(f*x + e)^2 + 2*cos(f*x + e) + 1))*s in(f*x + e) + 12*sqrt(-a)*(cos(f*x + e) - 1)*log(-(8*a*cos(f*x + e)^3 + 4* (2*cos(f*x + e)^2 - cos(f*x + e))*sqrt(-a)*sqrt((a*cos(f*x + e) + a)/cos(f *x + e))*sin(f*x + e) - 7*a*cos(f*x + e) + a)/(cos(f*x + e) + 1))*sin(f*x + e) - 4*(11*cos(f*x + e)^2 - 9*cos(f*x + e))*sqrt((a*cos(f*x + e) + a)/co s(f*x + e)))/((a*c^2*f*cos(f*x + e) - a*c^2*f)*sin(f*x + e)), 1/12*(3*sqrt (2)*sqrt(a)*(cos(f*x + e) - 1)*arctan(sqrt(2)*sqrt((a*cos(f*x + e) + a)/co s(f*x + e))*cos(f*x + e)/(sqrt(a)*sin(f*x + e)))*sin(f*x + e) + 12*sqrt(a) *(cos(f*x + e) - 1)*arctan(2*sqrt(a)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e ))*cos(f*x + e)*sin(f*x + e)/(2*a*cos(f*x + e)^2 + a*cos(f*x + e) - a))*si n(f*x + e) + 2*(11*cos(f*x + e)^2 - 9*cos(f*x + e))*sqrt((a*cos(f*x + e) + a)/cos(f*x + e)))/((a*c^2*f*cos(f*x + e) - a*c^2*f)*sin(f*x + e))]
\[ \int \frac {1}{\sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))^2} \, dx=\frac {\int \frac {1}{\sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{2}{\left (e + f x \right )} - 2 \sqrt {a \sec {\left (e + f x \right )} + a} \sec {\left (e + f x \right )} + \sqrt {a \sec {\left (e + f x \right )} + a}}\, dx}{c^{2}} \]
Integral(1/(sqrt(a*sec(e + f*x) + a)*sec(e + f*x)**2 - 2*sqrt(a*sec(e + f* x) + a)*sec(e + f*x) + sqrt(a*sec(e + f*x) + a)), x)/c**2
\[ \int \frac {1}{\sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))^2} \, dx=\int { \frac {1}{\sqrt {a \sec \left (f x + e\right ) + a} {\left (c \sec \left (f x + e\right ) - c\right )}^{2}} \,d x } \]
Exception generated. \[ \int \frac {1}{\sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))^2} \, dx=\text {Exception raised: TypeError} \]
Exception raised: TypeError >> an error occurred running a Giac command:IN PUT:sage2:=int(sage0,sageVARx):;OUTPUT:index.cc index_m i_lex_is_greater E rror: Bad Argument Value
Timed out. \[ \int \frac {1}{\sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))^2} \, dx=\int \frac {1}{\sqrt {a+\frac {a}{\cos \left (e+f\,x\right )}}\,{\left (c-\frac {c}{\cos \left (e+f\,x\right )}\right )}^2} \,d x \]